home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / DISK2 / PORTAL.CM_ / PORTAL.CM
Encoding:
Text File  |  1996-04-16  |  1.7 KB  |  103 lines

  1. #trace on
  2. #
  3. # set up some strings for dialling up
  4. #
  5. if ![load $number]
  6.   if [query $number "Enter your dial up phone number"]
  7.     save $number
  8.   end
  9. end
  10. if ![load $lusername]
  11.   if [query $lusername "Enter your login username"]
  12.     save $lusername
  13.   end
  14. end
  15. if ![load $lpw]
  16.   if [query $lpw "Enter your login password"]
  17.     save $lpw
  18.   end
  19. end
  20. if ![load $modemsetup]
  21.   if [query $modemsetup "Enter your modem setup string"]
  22.     save $modemsetup
  23.   end
  24. end
  25.  
  26. if ![load $dial_prefix]
  27.   if [query $dial_prefix "Enter your modem prefix string"]
  28.     save $dial_prefix
  29.   end
  30. end
  31.  
  32. # $modemsetup = "&f"
  33. $userprompt = "gin:"
  34. $passprompt = "word:"
  35. $hostprompt = "e:"
  36. $helpprompt = "ame:"
  37. %attempts = 10
  38. #
  39. #
  40. #----------------------------------------------------------
  41. #
  42. # initialize modem
  43. #
  44. output "atz"\13
  45. if ! [input 10 OK\n]
  46.   display "Modem is not responding"\n
  47.   abort
  48. end
  49. #
  50. # setup our modem commands
  51. #
  52. output $modemsetup\13
  53. input 10 OK\n
  54. #
  55. # send phone number
  56. #
  57. %n = 0
  58. repeat
  59.   if %n = %attempts
  60.     display "Too many dial attempts"\n
  61.     abort
  62.   end
  63.   output "atdt"$dial_prefix$number\13
  64.   %ok = [input 60 CONNECT]
  65.   %n = %n + 1
  66. until %ok
  67. input 10 \n
  68. #
  69. #  wait till it's safe to send because some modem's hang up
  70. #  if you transmit during the connection phase
  71. #
  72. #wait 30 dcd
  73. #
  74. # now prod the terminal server
  75. #
  76. output \13
  77. #
  78. # portal through compuserve
  79. input 30 $hostprompt
  80. output "+"\13
  81. input 30 $helpprompt
  82. output "pinip,li00"\13
  83. #
  84. #
  85. #  wait for the username prompt
  86. #
  87. input 30 $userprompt
  88. output $lusername\13
  89. #
  90. # and the password
  91. #
  92. input 30 $passprompt
  93. output $lpw\13
  94. #
  95. # we are now logged in
  96. #
  97. display "Connected to Portal"\13
  98. sleep 6
  99. end
  100. #
  101. # now we are finished.
  102. #
  103.